#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "MPU6050.h"


int main(void)
{
	uint8_t i;
	OLED_Init();
	MPU6050_Init();
	OLED_ShowString(1, 1, "Hello Bird!");
	OLED_ShowString(2, 1, "Ax:");
	OLED_ShowString(2, 9, "Gx:");
	OLED_ShowString(3, 1, "Ay:");
	OLED_ShowString(3, 9, "Gy:");
	OLED_ShowString(4, 1, "Az:");
	OLED_ShowString(4, 9, "Gz:");
	while (1)
	{
		MPU6050_GetData();
		for (i = 0; i < 3; i ++)
		{
			OLED_ShowSignedNum(2 + i, 4, MPU6050_Stateinfo[i], 4);
			OLED_ShowSignedNum(2 + i, 12, MPU6050_Stateinfo[4 + i], 4);
		}
	}
}
